package com.xxxx.server.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxxx.server.pojo.Geli;
import com.xxxx.server.mapper.GeliMapper;
import com.xxxx.server.pojo.Ivaccine;
import com.xxxx.server.pojo.RespPageBean;
import com.xxxx.server.service.IGeliService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 隔离报备表单 服务实现类
 * </p>
 *
 * @author zhoubin
 * @since 2022-06-27
 */
@Service
public class GeliServiceImpl extends ServiceImpl<GeliMapper, Geli> implements IGeliService {
    @Autowired
    private GeliMapper geliMapper;

    @Override
    public RespPageBean getGeliByPage(Integer currentPage, Integer size, Geli geli, String[] beginDateScope, int type, String collegename, int collegeid, String classname, int classid,int roleid) {
        Page<Geli> page = new Page<>(currentPage,size);
        IPage<Geli> geliByPage = geliMapper.getGeliByPage(page, geli, beginDateScope,type,collegename,collegeid,classname,classid,roleid);
        RespPageBean respPageBean = new RespPageBean(geliByPage.getTotal(), geliByPage.getRecords());
        return respPageBean;
    }
}
